package com.ctakit.kiwi.server;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration;
import org.springframework.boot.autoconfigure.data.redis.RedisRepositoriesAutoConfiguration;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.transaction.annotation.EnableTransactionManagement;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

@EnableTransactionManagement
@EnableScheduling
@ServletComponentScan
@MapperScan("com.ctakit.kiwi.**.mapper")
@SpringBootApplication(scanBasePackages = {"com.ctakit.kiwi"},
        exclude = {RedisAutoConfiguration.class, RedisRepositoriesAutoConfiguration.class})
public class MyApplication implements WebMvcConfigurer {

    public static void main(String[] args) {
        SpringApplication.run(MyApplication.class, args);

        System.out.println("Server startup");
    }
}